package com.baibang.baibang815.service.Impl;

import com.baibang.baibang815.domain.User;
import com.baibang.baibang815.mapper.UserMapper;
import com.baibang.baibang815.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;



    @Override
    public User selectById(int id) {
        return userMapper.selectById(id);
    }

    @Override
    public int saveUser(User user) {
        return userMapper.insert(user);
    }

    @Override
    public int updateUser(User user) {
        return userMapper.update(user);
    }

    @Override
    public int deleteUser(int id) {
        return userMapper.delete(id);
    }



}